package com.lg.cms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 用户-文章多对多 评论表
 * </p>
 *
 * @author lg
 * @since 2020-09-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
public class Comment implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户表id(user)
     */
    private Long userId;

    /**
     * 用户名
     */
    @TableField(select = false)
    private String user;

    /**
     * 文章表id(article)
     */
    private Integer articleId;

    /**
     * 文章标题
     */
    @TableField(select = false)
    private String article;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 审核状态((1, 通过), (0, 未通过)),null为未审核
     */
    @TableField("`check`")
    private Boolean check;

    /**
     * 评论审核回复内容
     */
    private String response;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;

    /**
     * 逻辑删除
     */
    @TableLogic
    private Boolean isDelete;


}
